<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./productionReport.xhtml">

            <ui:define name="tabContent">

                <p:panel header="Theo tháng">
                    <h:form>
                        <h:panelGrid columns="10">
                            Tháng
                            <h:selectOneMenu value="#{subCpProductionBean.month}">
                                <f:selectItem itemLabel="1" itemValue="1"/><f:selectItem itemLabel="2" itemValue="2"/>
                                <f:selectItem itemLabel="3" itemValue="3"/><f:selectItem itemLabel="4" itemValue="4"/>
                                <f:selectItem itemLabel="5" itemValue="5"/><f:selectItem itemLabel="6" itemValue="6"/>
                                <f:selectItem itemLabel="7" itemValue="7"/><f:selectItem itemLabel="8" itemValue="8"/>
                                <f:selectItem itemLabel="9" itemValue="9"/><f:selectItem itemLabel="10" itemValue="10"/>
                                <f:selectItem itemLabel="11" itemValue="11"/><f:selectItem itemLabel="12" itemValue="12"/>
                            </h:selectOneMenu>
                            Năm
                            <h:selectOneMenu value="#{subCpProductionBean.year}">
                                <f:selectItem itemLabel="2011" itemValue="2011"/>
                                <f:selectItem itemLabel="2012" itemValue="2012"/>
                                <f:selectItem itemLabel="2013" itemValue="2013"/>
                            </h:selectOneMenu>
                            Sub CP
                            <h:selectOneMenu value="#{subCpProductionBean.subCp}" required="true" requiredMessage="Bạn chưa chọn Sub CP">
                                <f:selectItem itemLabel="K2Bridge" itemValue="K2Bridge"/>
                            </h:selectOneMenu>

                        </h:panelGrid>
                        <h:panelGrid columns="10">
                            Mạng
                            <p:selectManyCheckbox value="#{subCpProductionBean.operators}" required="true" requiredMessage="Bạn chưa chọn mạng" style="width: 150px; height: 65px">
                                <f:selectItem itemLabel="Viettel" itemValue="smsgate_viettel6771"/>
                                <f:selectItem itemLabel="Mobifone" itemValue="smsgate_mobifone6771"/>
                                <f:selectItem itemLabel="Vinaphone" itemValue="smsgate_vinaphone6771"/>
                            </p:selectManyCheckbox>
                            <p:commandButton ajax="false" value="Xem báo cáo" action="#{subCpProductionBean.report()}"/>
                        </h:panelGrid>

                    </h:form>
                    <br/>
                    <h:form>
                        <h:outputText value="Viettel" rendered="#{subCpProductionBean.viettelList.size() > 0}"/>
                        <p:dataTable  id="tblViettel" value="#{subCpProductionBean.viettelList}" var="viettelItem"
                                      rendered="#{subCpProductionBean.viettelList.size() > 0}">
                            <p:column headerText="Ngày" sortBy="#{viettelItem.date}">
                                #{viettelItem.dateString}
                            </p:column>
                            <p:column headerText="6071">
                                #{viettelItem.mo6071} (#{viettelItem.mt6071})
                            </p:column>
                            <p:column headerText="6171">
                                #{viettelItem.mo6171} (#{viettelItem.mt6171})
                            </p:column>
                            <p:column headerText="6271">
                                #{viettelItem.mo6271} (#{viettelItem.mt6271})
                            </p:column>
                            <p:column headerText="6371">
                                #{viettelItem.mo6371} (#{viettelItem.mt6371})
                            </p:column>
                            <p:column headerText="6471">
                                #{viettelItem.mo6471} (#{viettelItem.mt6471})
                            </p:column>
                            <p:column headerText="6571">
                                #{viettelItem.mo6571} (#{viettelItem.mt6571})
                            </p:column>
                            <p:column headerText="6671">
                                #{viettelItem.mo6671} (#{viettelItem.mt6671})
                            </p:column>
                            <p:column headerText="6771">
                                #{viettelItem.mo6771} (#{viettelItem.mt6771})
                            </p:column>
                        </p:dataTable>
                    </h:form>
                    <br/>
                    <h:form>
                        <h:outputText value="Mobifone" rendered="#{subCpProductionBean.mobifoneList.size() > 0}"/>
                        <p:dataTable id="tblmobifone" value="#{subCpProductionBean.mobifoneList}" var="mobifoneItem"
                                     rendered="#{subCpProductionBean.mobifoneList.size() > 0}">
                            <p:column headerText="Ngày" sortBy="#{mobifoneItem.date}">
                                #{mobifoneItem.dateString}
                            </p:column>
                            <p:column headerText="6071">
                                #{mobifoneItem.mo6071} (#{mobifoneItem.mt6071})
                            </p:column>
                            <p:column headerText="6171">
                                #{mobifoneItem.mo6171} (#{mobifoneItem.mt6171})
                            </p:column>
                            <p:column headerText="6271">
                                #{mobifoneItem.mo6271} (#{mobifoneItem.mt6271})
                            </p:column>
                            <p:column headerText="6371">
                                #{mobifoneItem.mo6371} (#{mobifoneItem.mt6371})
                            </p:column>
                            <p:column headerText="6471">
                                #{mobifoneItem.mo6471} (#{mobifoneItem.mt6471})
                            </p:column>
                            <p:column headerText="6571">
                                #{mobifoneItem.mo6571} (#{mobifoneItem.mt6571})
                            </p:column>
                            <p:column headerText="6671">
                                #{mobifoneItem.mo6671} (#{mobifoneItem.mt6671})
                            </p:column>
                            <p:column headerText="6771">
                                #{mobifoneItem.mo6771} (#{mobifoneItem.mt6771})
                            </p:column>
                        </p:dataTable>
                    </h:form>
                    <br/>
                    <h:form>
                        <h:outputText value="Vinaphone" rendered="#{subCpProductionBean.vinaphoneList.size() > 0}"/>
                        <p:dataTable id="tblvinaphone" value="#{subCpProductionBean.vinaphoneList}" var="vinaphoneItem"
                                     rendered="#{subCpProductionBean.vinaphoneList.size() > 0}">
                            <p:column headerText="Ngày" sortBy="#{vinaphoneItem.date}">
                                #{vinaphoneItem.dateString}
                            </p:column>
                            <p:column headerText="6071">
                                #{vinaphoneItem.mo6071} (#{vinaphoneItem.mt6071})
                            </p:column>
                            <p:column headerText="6171">
                                #{vinaphoneItem.mo6171} (#{vinaphoneItem.mt6171})
                            </p:column>
                            <p:column headerText="6271">
                                #{vinaphoneItem.mo6271} (#{vinaphoneItem.mt6271})
                            </p:column>
                            <p:column headerText="6371">
                                #{vinaphoneItem.mo6371} (#{vinaphoneItem.mt6371})
                            </p:column>
                            <p:column headerText="6471">
                                #{vinaphoneItem.mo6471} (#{vinaphoneItem.mt6471})
                            </p:column>
                            <p:column headerText="6571">
                                #{vinaphoneItem.mo6571} (#{vinaphoneItem.mt6571})
                            </p:column>
                            <p:column headerText="6671">
                                #{vinaphoneItem.mo6671} (#{vinaphoneItem.mt6671})
                            </p:column>
                            <p:column headerText="6771">
                                #{vinaphoneItem.mo6771} (#{vinaphoneItem.mt6771})
                            </p:column>
                        </p:dataTable>
                    </h:form>
                </p:panel>
            </ui:define>

        </ui:composition>

    </body>
</html>


